<template>
  <div class="box">
    <h2>子组件 add</h2>
    从vuex中获取的值:<label></label>
    <br />
    <button @click="add">值+1</button>
    <button @click="asyncAdd">延时1s值+1</button>
  </div>
</template>

<script>
export default {
  name: 'AddItem',
}
</script>

<style lang="css" scoped>
.box {
  border: 3px solid #ccc;
  width: 400px;
  padding: 10px;
  margin: 20px;
}
h2 {
  margin-top: 10px;
}
</style>